#!/bin/bash
source /etc/profile

export JAVA_HOME=/usr/java/jdk1.8.0_141
export PATH=$PATH:${javaHome}/bin

function deploy(){
	cd /usr/local/beetle/code/$1
	git pull
	mvn clean deploy -U -DskipTests
}


case "$1" in
    config)
        deploy matrix-config ;;
    index)
        deploy matrix-indexing ;;
    common)
        deploy matrix-commons ;;
    *)
    	echo "Usage: deploy-matrix-jar.sh {config|index|common}"
    exit 1
esac

